package com.huawei.updatesdk.a.b.d;

import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import com.huawei.updatesdk.a.a.c.e;
import com.huawei.updatesdk.a.b.d.a.a;
import com.huawei.updatesdk.a.b.d.a.c;
import com.huawei.updatesdk.a.b.d.a.d;
import java.util.concurrent.Executor;
import org.json.JSONObject;

public class b extends AsyncTask<c, Void, d> {
    protected c a = null;
    private d b = null;
    private a c = null;
    private com.huawei.updatesdk.a.a.a.b d = null;
    private int e = 0;

    public b(c cVar, a aVar) {
        this.a = cVar;
        this.c = aVar;
    }

    private d a(String str, String str2, d dVar) {
        try {
            dVar.fromJson(new JSONObject(str2));
            dVar.a(0);
        } catch (Throwable e) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "parse json error", e);
        } catch (Throwable e2) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "parse json error", e2);
        } catch (Throwable e22) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "parse json error", e22);
        } catch (Throwable e222) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "parse json error", e222);
        }
        return dVar;
    }

    private void a(d dVar, int i, d.a aVar, Throwable th) {
        if (dVar != null) {
            dVar.a(i);
            dVar.a(aVar);
            dVar.a(th.toString());
        }
    }

    private void a(d dVar, int i, d.a aVar, Throwable th, String str) {
        a(dVar, i, aVar, th);
        a(str, th);
    }

    private void a(String str, String str2, String str3) {
        if (TextUtils.isEmpty(str)) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "Store response error, method:" + this.a.a() + ", url:" + str3 + ", body:" + str2 + ", resData == null");
        } else {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "Store response error, method:" + this.a.a() + ", url:" + str3 + ", body:" + str2 + ", resData is not json string");
        }
    }

    private void a(String str, Throwable th) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("invoke store error");
        stringBuilder.append(", exceptionType:").append(th.toString());
        stringBuilder.append(", url:").append(str);
        stringBuilder.append(", method:").append(this.a.a());
        stringBuilder.append(", retryTimes:" + this.e);
        com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", stringBuilder.toString(), th);
        Log.e("StoreTask", "UpdateSDK call store error: " + th.toString());
    }

    private boolean a(String str) {
        return TextUtils.isEmpty(str) || !e.b(str);
    }

    private boolean c(d dVar) {
        if (isCancelled()) {
            return false;
        }
        if (dVar.a() != 1 && dVar.a() != 2) {
            return false;
        }
        int i = this.e;
        this.e = i + 1;
        if (i >= 3) {
            com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "retry completed total times = " + this.e + ",response.responseCode = " + dVar.a());
            return false;
        }
        com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "retry times = " + this.e + ",response.responseCode = " + dVar.a());
        return true;
    }

    private void d() {
        d(this.b);
    }

    private void d(d dVar) {
        if (!isCancelled() && this.c != null) {
            d a;
            if (dVar == null) {
                com.huawei.updatesdk.a.a.b.a.a.a.d("StoreTask", "notifyResult, response is null");
                try {
                    a = a.a(this.a.a());
                } catch (Throwable e) {
                    com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "notifyResult, create response error, method:" + this.a.a(), e);
                    a = dVar;
                } catch (Throwable e2) {
                    com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "notifyResult, create response error, method:" + this.a.a(), e2);
                    a = dVar;
                }
                if (a == null) {
                    a = new d();
                    a.a(d.a.PARAM_ERROR);
                } else {
                    a.a(d.a.UNKNOWN_EXCEPTION);
                }
                a.a(1);
            } else {
                a = dVar;
            }
            this.c.b(this.a, a);
        }
    }

    public final d a() {
        d dVar = null;
        do {
            if (this.e > 0 && dVar != null) {
                com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "call store error! responseCode:" + dVar.a() + ", retryTimes:" + this.e);
            }
            dVar = b();
            a(dVar);
        } while (c(dVar));
        this.b = dVar;
        return this.b;
    }

    protected d a(c... cVarArr) {
        com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "doInBackground, method:" + this.a.a());
        d a = a();
        if (this.c != null) {
            this.c.a(this.a, a);
        }
        return a;
    }

    public void a(d dVar) {
    }

    public final void a(Executor executor) {
        executeOnExecutor(executor, new c[]{this.a});
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public com.huawei.updatesdk.a.b.d.a.d b() {
        /*
        r10 = this;
        r1 = 0;
        r9 = 5;
        r8 = 2;
        r7 = 1;
        r0 = r10.a;	 Catch:{ ConnectException -> 0x01a7, SocketTimeoutException -> 0x00fa, ConnectTimeoutException -> 0x0106, IOException -> 0x0112, IllegalArgumentException -> 0x011e, IllegalAccessException -> 0x012a, ArrayIndexOutOfBoundsException -> 0x0136, Exception -> 0x0142 }
        r0 = r0.a();	 Catch:{ ConnectException -> 0x01a7, SocketTimeoutException -> 0x00fa, ConnectTimeoutException -> 0x0106, IOException -> 0x0112, IllegalArgumentException -> 0x011e, IllegalAccessException -> 0x012a, ArrayIndexOutOfBoundsException -> 0x0136, Exception -> 0x0142 }
        r6 = com.huawei.updatesdk.a.b.d.a.a(r0);	 Catch:{ ConnectException -> 0x01a7, SocketTimeoutException -> 0x00fa, ConnectTimeoutException -> 0x0106, IOException -> 0x0112, IllegalArgumentException -> 0x011e, IllegalAccessException -> 0x012a, ArrayIndexOutOfBoundsException -> 0x0136, Exception -> 0x0142 }
        r0 = com.huawei.updatesdk.a.b.a.a.a();	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = r0.b();	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = com.huawei.updatesdk.a.a.c.b.b.a(r0);	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        if (r0 != 0) goto L_0x0036;
    L_0x001c:
        r0 = 3;
        r6.a(r0);	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = com.huawei.updatesdk.a.b.d.a.d.a.NO_NETWORK;	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r6.a(r0);	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = r6;
    L_0x0026:
        if (r0 != 0) goto L_0x0035;
    L_0x0028:
        r0 = new com.huawei.updatesdk.a.b.d.a.d;
        r0.<init>();
        r0.a(r9);
        r1 = com.huawei.updatesdk.a.b.d.a.d.a.PARAM_ERROR;
        r0.a(r1);
    L_0x0035:
        return r0;
    L_0x0036:
        r0 = r10.a;	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r2 = r0.b();	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = r10.a;	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r1 = r0.d();	 Catch:{ ConnectException -> 0x01ab, SocketTimeoutException -> 0x0198, ConnectTimeoutException -> 0x0189, IOException -> 0x017d, IllegalArgumentException -> 0x0171, IllegalAccessException -> 0x0165, ArrayIndexOutOfBoundsException -> 0x0159, Exception -> 0x0153 }
        r0 = "StoreTask";
        r3 = new java.lang.StringBuilder;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3.<init>();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r4 = "callStore, method:";
        r3 = r3.append(r4);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r4 = r10.a;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r4 = r4.a();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = r3.append(r4);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r4 = ", url:";
        r3 = r3.append(r4);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = r3.append(r1);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r4 = ", body:";
        r3 = r3.append(r4);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = r3.append(r2);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = r3.toString();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        com.huawei.updatesdk.a.a.b.a.a.a.a(r0, r3);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0 = new com.huawei.updatesdk.a.a.a.b;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0.<init>();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r10.d = r0;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0 = r10.d;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = "UTF-8";
        r4 = r10.c();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r5 = com.huawei.updatesdk.a.b.a.a.a();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r5 = r5.b();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0 = r0.a(r1, r2, r3, r4, r5);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0 = r0.a();	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = r10.a(r0);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        if (r3 == 0) goto L_0x00a7;
    L_0x0099:
        r3 = 1;
        r6.a(r3);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.JSON_ERROR;	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r6.a(r3);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r10.a(r0, r2, r1);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r0 = r6;
        goto L_0x0026;
    L_0x00a7:
        r0 = r10.a(r2, r0, r6);	 Catch:{ ConnectException -> 0x01b0, SocketTimeoutException -> 0x019d, ConnectTimeoutException -> 0x018e, IOException -> 0x0181, IllegalArgumentException -> 0x0175, IllegalAccessException -> 0x0169, ArrayIndexOutOfBoundsException -> 0x015d, Exception -> 0x0153 }
        r3 = "StoreTask";
        r4 = new java.lang.StringBuilder;	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r4.<init>();	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r5 = "callStore response, method:";
        r4 = r4.append(r5);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r5 = r10.a;	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r5 = r5.a();	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r4 = r4.append(r5);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r5 = ", url:";
        r4 = r4.append(r5);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r4 = r4.append(r1);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r5 = ", body:";
        r4 = r4.append(r5);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r2 = r4.append(r2);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r4 = ", Receive Json msg:";
        r2 = r2.append(r4);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r4 = r0.toJson();	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r2 = r2.append(r4);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        r2 = r2.toString();	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        com.huawei.updatesdk.a.a.b.a.a.a.a(r3, r2);	 Catch:{ ConnectException -> 0x00ed, SocketTimeoutException -> 0x01a2, ConnectTimeoutException -> 0x0193, IOException -> 0x0185, IllegalArgumentException -> 0x0179, IllegalAccessException -> 0x016d, ArrayIndexOutOfBoundsException -> 0x0161, Exception -> 0x0155 }
        goto L_0x0026;
    L_0x00ed:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
    L_0x00f0:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.CONNECT_EXCEPTION;
        r0 = r10;
        r2 = r7;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x00fa:
        r4 = move-exception;
        r5 = r1;
    L_0x00fc:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.CONNECT_EXCEPTION;
        r0 = r10;
        r2 = r8;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x0106:
        r4 = move-exception;
        r5 = r1;
    L_0x0108:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.CONNECT_EXCEPTION;
        r0 = r10;
        r2 = r8;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x0112:
        r4 = move-exception;
        r5 = r1;
    L_0x0114:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.IO_EXCEPTION;
        r0 = r10;
        r2 = r7;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x011e:
        r4 = move-exception;
        r5 = r1;
    L_0x0120:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.PARAM_ERROR;
        r0 = r10;
        r2 = r9;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x012a:
        r4 = move-exception;
        r5 = r1;
    L_0x012c:
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.UNKNOWN_EXCEPTION;
        r0 = r10;
        r2 = r7;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x0136:
        r4 = move-exception;
        r5 = r1;
    L_0x0138:
        r2 = 6;
        r3 = com.huawei.updatesdk.a.b.d.a.d.a.NO_PROGUARD;
        r0 = r10;
        r0.a(r1, r2, r3, r4, r5);
        r0 = r1;
        goto L_0x0026;
    L_0x0142:
        r0 = move-exception;
        r6 = r1;
    L_0x0144:
        if (r6 == 0) goto L_0x014d;
    L_0x0146:
        r2 = r0.toString();
        r6.a(r2);
    L_0x014d:
        r10.a(r1, r0);
        r0 = r6;
        goto L_0x0026;
    L_0x0153:
        r0 = move-exception;
        goto L_0x0144;
    L_0x0155:
        r2 = move-exception;
        r6 = r0;
        r0 = r2;
        goto L_0x0144;
    L_0x0159:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0138;
    L_0x015d:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0138;
    L_0x0161:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x0138;
    L_0x0165:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x012c;
    L_0x0169:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x012c;
    L_0x016d:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x012c;
    L_0x0171:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0120;
    L_0x0175:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0120;
    L_0x0179:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x0120;
    L_0x017d:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0114;
    L_0x0181:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0114;
    L_0x0185:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x0114;
    L_0x0189:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0108;
    L_0x018e:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x0108;
    L_0x0193:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x0108;
    L_0x0198:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x00fc;
    L_0x019d:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x00fc;
    L_0x01a2:
        r4 = move-exception;
        r5 = r1;
        r1 = r0;
        goto L_0x00fc;
    L_0x01a7:
        r4 = move-exception;
        r5 = r1;
        goto L_0x00f0;
    L_0x01ab:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x00f0;
    L_0x01b0:
        r4 = move-exception;
        r5 = r1;
        r1 = r6;
        goto L_0x00f0;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.huawei.updatesdk.a.b.d.b.b():com.huawei.updatesdk.a.b.d.a.d");
    }

    protected void b(d dVar) {
        com.huawei.updatesdk.a.a.b.a.a.a.a("StoreTask", "onPostExecute, method:" + this.a.a());
        d();
    }

    protected String c() {
        return "Android/1.0";
    }

    protected /* synthetic */ Object doInBackground(Object[] objArr) {
        return a((c[]) objArr);
    }

    protected /* synthetic */ void onPostExecute(Object obj) {
        b((d) obj);
    }
}
